<template>
    <map-control @mapLoad="mapLoadEvent"></map-control>
</template>

<script lang="ts" setup>
import TablePagination from '@/components/TablePagination/index.vue'
import { onMounted, reactive } from 'vue'
// 以下3个为地图控件相关的组件
import mapControl from '@/components/map/index.vue'
import { store } from '@/components/map/mapStore'
import { image } from '@/assets/index'
import {ElMessage} from "element-plus";

const pagination = reactive({
    currentPage: 1,
    pageSize: 10,
    total: 18
})
let lastLayer = { draw: '', state: '' }
let totalGraphic = []
// 创建文字图层
let textLayer
let drawLayer
const mapLoadEvent = () => {
    ElMessage.success('地图加载成功')
    textLayer = store.BNMap.creatGraphicsLayer({ id: 'text' })
    drawLayer = store.BNMap.creatGraphicsLayer({ id: 'demo' })
}

const currentChange = (value: any) => {
    pagination.currentPage = value
}

const sizeChange = (value: any) => {
    pagination.pageSize = value
}

onMounted(() => {
    console.log(666)
})

</script>

<style lang="less" scoped>
.home{
    background: #fff;
    height: 200px;
    padding-top: 20px;
}
.container{
    display: grid;
    grid-gap: 5px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-template-rows: repeat(2, 100px);
}
</style>
